import Vue from 'vue'
import VueRouter from 'vue-router'
import Main from '../views/Main'
import Login from '../views/Login'
import NotFound from '@/views/404.vue'
Vue.use(VueRouter)

const routes = [
    {
        path:'/',
        component: Main,
        name:'Main',
        redirect:'/itemManagement',
        children:[]
    },
    {
        path: '/login',
        name:'login',
        component: Login
    },
    {
        path: '/404',
        name:'notFound',
        component: NotFound
    }
]

const router = new VueRouter({
    routes // (缩写) 相当于 routes: routes
})

export default router
